/* 
 * This program is free software; you can redistribute it and/or modify 
 * it under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; either version 3 of the License, or 
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 * for more details.
 * 
 * You should have received a copy of the GNU General Public License along 
 * with this program; if not, write to the Free Software Foundation, Inc., 
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef WISHMASTER_HANABIRAPARSER_H
#define WISHMASTER_HANABIRAPARSER_H

#include <QObject>
#include <QRegExp>
#include "boardparsers/boardparser.h"

namespace Wishmaster
{
	struct HanabiraParserImpl;
	class HanabiraParser : public QObject, public BoardParser
	{
		Q_OBJECT
		Q_INTERFACES(Wishmaster::BoardParser)
		Q_DISABLE_COPY(HanabiraParser);
	public:
		HanabiraParser(const QString& boardname = QString());
		virtual ~HanabiraParser();

		virtual QList<ThreadInfo> getThreadList(const QString& chanName, const QString& boardId, const QByteArray& input);
		virtual QList<PostInfo> getPosts(const ThreadId& threadId, const QByteArray& input);
		virtual PostId getPostID(const QString& link, const ThreadId& threadId);

		virtual void setTimestampFormat(const QString& format);

		virtual QString id();
		virtual BoardParser* clone(const QString& boardname);
	
		virtual QList<PostId> findLinks(const ThreadId& threadId, const QString& posttext);

	private:
		HanabiraParserImpl* m_impl;

	};
}

#endif
